<template>
  <div id="app">
    <the-header v-if="headerVisible" />
    <router-view></router-view>
    <go-top></go-top>
  </div>
</template>

<script>
import { mapState } from 'vuex'
import TheHeader from '@/components/the-header/TheHeader'
import GoTop from '@/components/go-top'
import config from '@/router/config'
import { title, keyword, description } from '@/utils/meta'
export default {
  name: 'App',
  provide () {
    return {
      rootThemeColor: '#fb7299',
      routerConfig: config,
      rootTitle: title,
      rootKeyword: keyword,
      rootDescription: description
    }
  },
  metaInfo () {
    return {
      title,
      meta: [
        { vmid: 'keywords', name: 'keywords', content: keyword },
        { vmid: 'description', name: 'description', content: description }
      ]
    }
  },
  components: {
    TheHeader,
    GoTop
  },
  data () {
    return {
    }
  },
  computed: {
    ...mapState(['headerVisible'])   
  }  
}
</script>